In recent years, an infrared communication system is widely used for data exchanging amongst portable electronic devices (mainly amongst personal mobile terminals such as mobile phones, laptop personal computers, electronic notebooks, or the like) or data exchanging between these devices and desktop personal computers or infrared-supporting printers.
Examples of communication schemes adopted in an infrared communication system are IrDA (Infrared Data Association), and ASK (Amplitude Shift Keying), or the like. Of these methods, widely spread in general is IrDA which is a communication protocol for infrared communication. This communication protocol was defined on the basis of HDLC (High-Level Data Link Control) communication scheme which is a method for high-speed and highly-efficient data transferring between computers.
Amongst computers, data transmission is generally performed through packet exchanging in which packets each including data of a certain volume, sequence number added prior to and/or subsequent to the data, and information indicating an address or the like is transmitted or received. Each of the packets used in HDLC communication scheme and IrDA communication scheme is referred to as a “frame”, and is administrated by an IrLAP layer.
Each frame includes fields of an address (A), control (C), information (I), and a frame control sequence (FCS), and flags added at the head and tail of the frame. There are various kinds of frames, such as an I (Information) frame for information transfer, an S (Supervisory) frame for supervision/control of communication, or a U (Unnumbered) frame for (i) connection or shutdown of communication or (ii) data communication or the like in which no data retransmission is performed.
Since data transmission cannot be completed within one frame in most cases, the data is divided into plural I frames or plural UI frames. Each of I frames contains data to be transmitted in the data field, and is given a sequence number by which any omission of data can be found. With this arrangement, highly-reliable communication is realized. Each of UI frames contains data to be transmitted in an I field, but is not given a sequence number by which any omission of data can be found.
The S frame has no I field for containing data, and is used for transmission of notification of condition, such as establishment of communication, or a busy state, or used for a request for retransmission or the like. The U flame is called a non-numerical frame as it has no sequence number like those of the I frames. The U frame is used for setting of communication mode, report of response and irregular condition, or establishment of data link.
As mentioned before, IrDA communication scheme is based on the HDLC communication scheme. However, a communication scheme in general could be either full-duplex transmission method in which transmission and reception are simultaneously performed, or a half-duplex communication scheme in which transmission and reception are not simultaneously performed. In a case of a half-duplex communication scheme, it is necessary to define a signal for switching transmission and reception.
In HDLC method, a full-duplex method can be adopted. However, in IrDA communication scheme, data transmission is performed by using a base-band modulated infrared ray which propagates in the free space. Therefore, an interference of infrared occurs, when two or more stations within a communication range simultaneously perform transmission. Accordingly, proper communication can not be performed.
For this reason, IrDA communication scheme adopts a semi-duplex method in which transmission before establishment of a communication link is performed only if no infrared exists within a communication range, and after the communication link is established, a transmission right is periodically exchanged between two stations in communication.
FIG. 19 shows how a communication link is established in IrDA. In IrDA, a connection with a link layer (LAP layer) is established as follows. A primary station transmits an SNRM command. Then, in response to the command, a secondary station transmits a UA response. Each of the SNRM command and the UA response contains various parameters (data transmission speed, maximum data length, etc.). With these parameters, the stations in communication is able to know communication parameters of the station on the other side. Thus, data transmission is performed with most efficient communication parameters.
FIG. 9 is a block diagram showing an application of the communication scheme. In HDLC communication scheme or IrDA communication scheme, what performs transmission or reception is referred to as “station”. In general, communication between (i) the primary station which performs data link control for controlling communication and (ii) the secondary station which complies with the control of the primary station is performed by transmitting/receiving between these stations the above described frame as a command (Primary Station® secondary station) or a response (Secondary Station® primary station). This is called an unbalanced communication scheme. As shown in the figure, a computer, mobile phone, electronic notebook or the like, or a TV or the like functions as a station during communication, and performs data exchanging by using infrared as a transmission medium.
FIG. 10 is a signal sequence diagram for illustrating a typical process using the I frames in these communication schemes. In this diagram, data which is divided into plural I frames is transmitted from a station A (primary station) to a station B (secondary station). Note that a window size (the number of I frames transmitted at once without interruption) is 3.
First, the station A respectively gives numbers “0”, “1”, and “2” to the frames corresponding to the data to be transmitted, and transmits the frames as I frames. Frames of with the respective sequence numbers “0” and “1” are transmitted with a P/F (Pole/Final) bit being set to 0, so that the transmission right is not transferred to the secondary station. Further, a frame with the sequence number of “2” is transmitted with the P/F bit set to 1, so that the transmission right is transferred to the secondary station.
The station B receives the frames respectively with the sequence numbers “0”, “1”, and “2”. After the frame with the sequence number “2” and the P/F bit set to 1 is received, and if all the frames are properly received, the station B requests transmission of a third data item by transmitting in reply a response frame with a number “3” which is the subsequent number to “2”. This response frame is an S frame called RR frame. When the RR frame is transmitted from the secondary station, the R/F bit of the RR frame is set to 1, so that the transmission right is transferred to the primary station.
When the station A confirms the response from the station B, the station A transmits data items starting from the third data, with sequential numbers “3”, “4”, and “5” being respectively added to the data items. By repeating these steps as many times as needed, it is possible to improve the accuracy of plural frame communication. If an error or an omission of data item is detected in the station B, retransmission is possible by: (I) the station B transmitting an RR frame including the data number needed to be retransmitted; and (II) the station A retransmitting the frames starting from the data number needed to be retransmitted.
In data transmission using I frames, the number of frames which can be transmitted at once from the primary station is regulated by the window size. This window size is 7 at the maximum in IrLAP (Infrared Link Access Protocol)(Ver 1.1) of IrDA. This may cause deterioration of communication efficiency in the case of transmitting a large volume of data under such a communication condition that no error occurs, because a response frame is transmitted from the secondary station at every window size.
FIG. 11 is a signal sequence diagram showing a general procedure of these communications using UI frames. In this example, shown is a case where data is divided into plural UI frames and transmitted from an station A to a station B. Transmission of data in the form of UI frames is not restricted by the window size, and therefore the station A is able to successively transmit frames for the maximum turn-around period. After the maximum turn-around period of the station A elapses, an RR frame for transferring the transmission right is transmitted to the secondary station.
A maximum turn-around period is a period during which a station is able to retain the transmission right. If the transmission right is transferred to an opposite station, and if no response is received from the opposite station even after the elapse of the maximum turn-around period, the station having transmitted the transmission right is able to know that the frame for transferring transmission right did not reach the opposite station. The maximum turn-around period of the opposite station station can be known by exchanging parameters at the time of establishing the connection. In IrLAP, the maximum turn-around time is defined as to be 500 ms.
If the station B having received the transmission right by the RR frame has no transmission data transmission request within itself, the station B transfers back the transmission right to the primary station by transmitting an RR frame with the P/F bit set to 1.
Unlike data transmission using I frames, retransmission is not performed in data transmission using UI frames. This however is advantageous in terms of communication efficiency, when communication is performed under conditions where the quality of communication path is good and therefore an error hardly occurs. Because, under such conditions, the station A is able to continuously transmit frames for a period of 500 ms at the maximum.
FIG. 18 illustrates the standard IrDA protocol stack. The IrDA protocol stack includes: IrPHY (IrDA Physical Layer), IrLAP (IrDA Link Access Protocol), IrLMP (IrDA Link Management Protocol), TinyTP (Transport Protocol), and OBEX (Object Exchange protocol). IrPHY defines a modulation method, signal intensity, directivity, and the like. IrLAP defines an error control function, transparent transmission, and flow control, each of which is in accordance with the multipurpose HDLC (High level Data Link Control). Moreover, IrLAP defines (i) a function of making negotiations with its counterpart about communication speed and/or a maximum data size before starting communication therebetween; (ii) a procedure of searching and finding an unspecified external device to which the device is to be connected; and the like. IrLMP provides a multiplexing/demultiplexing function corresponding to the port number used in TCP or UDP of TCP/IP protocol (Transmission Control Protocol/Internet Protocol). Tiny TP is used for flow control in an individual logic link. OBEX is a communication protocol for exchanging objects by means of transmission/reception (i.e. data communication).
Generally, examples of such a response command defined by OBEX include: (i) a CONNECT command for connecting the client device to the server device with which the client device is to communicate; (ii) a DISCONNECT command for disconnecting the client device from the server device with which the client device is being communicated; (iii) the PUT command for sending an object such as a file; (iv) the GET command for receiving an object such as a file; (v) a SETPATH command for changing a path (current path), to which an object is to be sent, of the sever device; and (vi) an ABORT command for forcefully aborting transmission and/or reception of an object.
FIG. 20 illustrates a basic case where the client device sends such a request command to the server device and where the client device sends such a response command to the client device in reply. When the client device receives an object exchange request from a user, the client device sends the CONNECT command to the server device in order to establish a connection with the server device. The CONNECT command represents the connection request.
The server device receives the CONNECT command, and sends a SUCCESS response command to the client device in cases where the server device is connectable to the client device. The client device receives the SUCCESS response command, with the result that connection is established between the client device and the server device.
After the connection is established, the client device starts exchanging objects with the server device. Specifically, the client device sends, to the server device, a PUT command for sending an object. When the server device receives normally the PUT command from the client device, the server device sends a CONTINUE response command to the client device. The client device receives the CONTINUE response command from the server device, and therefore confirms that the server device has received the PUT command normally. Thereafter, the client device sends a next PUT command to the server device. The client device sends PUT commands to the server device until the client device finishes sending all the objects. When the server device has finished receiving these PUT commands normally up to the final PUT command, the server device sends a SUCCESS response command to the client device.
The client device receives the SUCCESS response command from the server device, and then sends the DISCONNECT command to the server device so as to carry out a process for disconnecting the client device from the server device. The DISCONNECT command represents a disconnection request.
When the server device receives the DISCONNECT command, the server device sends, to the client server, a SUCCESS response command, which represents permission for the disconnecting. The client device receives the SUCCESS response command, with the result that the client device is disconnected from the server device. In this way, the series of the object exchange between the client device and the server device are completed.
As such, the object exchange using OBEX is carried out in such a manner that: the client device sends a request command to the server device, and the server device sends a response command to the client device in reply.
Further, as is the case with the aforementioned IrDA protocol stack, communication protocols in a hierarchical structure such as OSI respectively are used in layers, each of which defines header information independent from those respectively defined by the other layers. Therefore, in each of the layers, such header information is rendered to data to be sent from one computer to another. The rendering of the header information is carried out in the layers in order from the uppermost layer to the bottom layer.
On the other hand, received data is passed on one by one from the bottom layer to the uppermost layer, after removing corresponding header information therefrom in each of the layers.
Japanese Unexamined Patent Publication No. 308791/1998 (Tokukaihei 10-308791; Published on Nov. 17, 1998)
However, the above-mentioned conventional configuration has the following problem. Namely, in data transmission using UI frames, frames are continuously transmitted for the maximum of 500 ms and the communication efficiency is therefore improved, provided that the communication is performed under such a condition that the quality of communication path is good and therefore an error hardly occurs. However, if the communication is performed via communication path whose quality is not so good, using of UI frames for data transmission may deteriorate the communication efficiency. This is because, unlike the communication using I frames, no retransmission is performed when using UI frames.
Further, a conventional IrDA does not support data transmission through one-way communication in which no response is required.